/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package xmlutils;

import java.util.Vector;
import org.kxml.Xml;
import org.kxml.kdom.Element;

/**
 *
 * @author Administrator
 */
public abstract class MultipleZoomsData {
    private Vector zoomLevels = new Vector(3);

    public MultipleZoomsData(Element element) {
        if (element != null) {
            int elementsCount = element.getChildCount();
            int elementType = -1;

            for (int i = 0; i < elementsCount; i++) {
                elementType = element.getType(i);
                if (elementType != Xml.ELEMENT) {
                    continue;
                }
                zoomLevels.addElement(new ZoomLevelData(element.getElement(i)));
            }
        }
    }

    public ZoomLevelData getZoomLevelAt(int i) {
        return (ZoomLevelData) zoomLevels.elementAt(i);
    }

    public int getLoopsSize() {
        return zoomLevels.size();
    }
}
